﻿namespace Acl.Modular
{
    /// <summary>
    /// 应用模块接口定义
    /// </summary>
    public interface IModuleActivaor
    {
        /// <summary>
        ///
        /// </summary>
        IModule Module { get; }

        /// <summary>
        /// 配置服务
        /// </summary>
        /// <param name="context">配置上下文</param>
        void Configure(ModuleContext context);

        /// <summary>
        /// Bundle规约验证
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        bool Match(ModuleContext context);

        /// <summary>
        /// 应用启动
        /// </summary>
        /// <param name="context"></param>
        void Start(ModuleContext context);

        /// <summary>
        /// 应用停止
        /// </summary>
        /// <param name="context"></param>
        void Stop(ModuleContext context);
    }
}